package com.softserveinc.lahire.builders;

import java.net.HttpURLConnection;

abstract class ResponseBuilder {
	
	protected Response response;
	
	public Response getResponse() {

		return response;
	}

	public void createNewResponse(int length, String contentType, int statusCode, String setCookie){
		response = new Response();
		
		
		response.setContentLength(length);
		response.setConnection("close");
		response.setServer("Lehire web server");
		response.setContentType(contentType);
		response.setStatusCode(statusCode);
		response.setCookie(setCookie);
	}
	
	public void createNewResponse(int length, String contentType, int statusCode){
		response = new Response();
		
		
		response.setContentLength(length);
		response.setConnection("close");
		response.setServer("Lehire web server");
		response.setContentType(contentType);
		response.setStatusCode(statusCode);
		
	}
	public abstract void buildHeaders();
	public abstract void appendBody(byte[] body);
}
